package org.example;

import org.example.common.service.UserService;
import org.example.constant.RpcConstant;
import org.example.provider.UserServiceImpl;
import org.example.registry.LocalRegistry;
import org.example.server.HttpServer;
import org.example.server.VertxHttpServer;

/**
 * @Title: ProviderConfig
 * @Author: kunliangzhao
 * @Package org.example
 * @Date: 2025/6/9 10:40
 * @Description: 测试获取配置
 */

public class ProviderConfig {

    public static void main(String[] args) {
        // RPC 框架初始化
        RpcApplication.init();

        // 注册服务
        LocalRegistry.register(UserService.class.getName(), UserServiceImpl.class);

        // 启动 web 服务
        HttpServer httpServer = new VertxHttpServer();
        httpServer.doStart(RpcApplication.getRpcConfig().getServerPort());
    }
}
